import io from "@hyoga/uni-socket.io"
// import io from "weapp.socket.io"

// const token = uni.getStorageSync('token')
// console.log("token", token)
// const socket = io('http://192.168.115.115:8000/', {
//   autoConnect: false,
//   transports: ['websocket'],
//   auth: { "token": token }
// })

export default function getSocket(token) {  
  return new io('http://192.168.115.115:8000/', {
    autoConnect: false,
    transports: ['websocket'],
    auth: { "token": token }
  })
};
